#!/usr/bin/env python
# -*- coding:utf-8 -*-
# @FileName  :699pic摄图网.py
# @Time      :2024/11/8 
# @Author    :CL
# @email     :1037654919@qq.com
#网址：https://699pic.com/   失败 返回的是js文件

import requests


class SheTuWang:
    def __init__(self):
        self.name = '摄图网'
        self.pic_url = 'https://699pic.com/'
        self.pic_type = 'https://699pic.com/photo/'
        self.headers = {
            "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7",
            "accept-language": "zh-CN,zh;q=0.9",
            "cache-control": "no-cache",
            "pragma": "no-cache",
            "priority": "u=0, i",
            "referer": "https://699pic.com/?sem=1&sem_kid=3022&sem_type=1&bd_vid=8674616367058094116",
            "sec-ch-ua": "\"Chromium\";v=\"130\", \"Google Chrome\";v=\"130\", \"Not?A_Brand\";v=\"99\"",
            "sec-ch-ua-mobile": "?0",
            "sec-ch-ua-platform": "\"Linux\"",
            "sec-fetch-dest": "document",
            "sec-fetch-mode": "navigate",
            "sec-fetch-site": "same-origin",
            "sec-fetch-user": "?1",
            "upgrade-insecure-requests": "1",
            "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36"
        }
        self.cookies = {
            "act_layer_1": "B",
            "act_layer_2": "A",
            "act_layer_3": "B",
            "act_layer_4": "A",
            "act_layer_5": "B",
            "act_layer_6": "A",
            "act_layer_7": "A",
            "act_layer_9": "A",
            "act_layer_10": "A",
            "user_uniqid": "0BA2B5CC96632E81",
            "_clck": "v9c831%7C2%7Cfq0%7C0%7C1748",
            "FIRSTVISITED": "1728871511.629",
            "acw_tc": "0bca323217310306595748705ec80d9da2d130743404c141be18a856fa5ac2",
            "PHPSESSID": "9416433c6e3e455683110f6aa373112f",
            "uniqid": "672d6e838ebc0",
            "sem_from": "1",
            "sem_from_add_time": "2024-11-08+09%3A50%3A59",
            "from_data": "YTo4OntzOjQ6Imhvc3QiO3M6MTc6Ind3dy5zZW0tYmFpZHUuY29tIjtzOjM6InNlbSI7YjoxO3M6MTA6InNvdXJjZWZyb20iO2k6MDtzOjQ6IndvcmQiO047czozOiJraWQiO2k6MzAyMjtzOjg6InNlbV90eXBlIjtpOjE7czo0OiJmcm9tIjtpOjA7czo2OiJjcmVhdGUiO3M6MTk6IjIwMjQtMTEtMDggMDk6NTA6NTkiO30%3D",
            "channel_info_reg": "d3d3LnNlbS1iYWlkdS5jb20%3D",
            "channel_info": "d3d3LnNlbS1iYWlkdS5jb20%3D",
            "bd_vid": "ODY3NDYxNjM2NzA1ODA5NDExNixodHRwcyUzQSUyRiUyRjY5OXBpYy5jb20lMkYlM0ZzZW0lM0QxJTI2c2VtX2tpZCUzRDMwMjIlMjZzZW1fdHlwZSUzRDElMjZiZF92aWQlM0Q4Njc0NjE2MzY3MDU4MDk0MTE2",
            "act_layer_11": "A",
            "referer_page": "index:index",
            "slotMachine1120": "1",
            "visited_times": "1",
            "redirect": "https%3A%2F%2F699pic.com%2F%3Fsem%3D1%26sem_kid%3D3022%26sem_type%3D1%26bd_vid%3D8674616367058094116",
            "Hm_lvt_e37e21a48e66c7bbb5d74ea6f717a49c": "1728871512,1731030666",
            "Hm_lpvt_e37e21a48e66c7bbb5d74ea6f717a49c": "1731030666",
            "HMACCOUNT": "8A7B5B515FA69801",
            "Hm_lvt_ddcd8445645e86f06e172516cac60b6a": "1728871512,1731030666",
            "Hm_lpvt_ddcd8445645e86f06e172516cac60b6a": "1731030666",
            "Hm_lvt_1154154465e0978ab181e2fd9a9b9057": "1728871512,1731030666",
            "Hm_lpvt_1154154465e0978ab181e2fd9a9b9057": "1731030666",
            "s_token": "4d66857880a9519cebe2b0849323e37d",
            "index-collectHInt": "1",
            "acw_sc__v2": "672d6e8ce4b2966f1d1bac513a047aeee53c5374",
            "ssxmod_itna": "QqGxyDRGi=itG=wK0de0P+P=x27KCePNNeCqq1dkCDl26QxA5D8D6DQeGTT9DnDD54aY0G0+P6FYfTqeezriBdGdznf2De6i7Acqs1IDGoDEx0=DcxDNDGjKBqDsxz40oD4b5GwKqAA9DDP1D03Db4D+QeX90xGyDitDGdbD4qDS3u2uDGp9DYfnfeDRGn29D7oPYGDDzxDA02iD3LaDIRFVi0TDzbRONLX9l2+P0DGW8ON51eGuDG6Oku0uD7Qdej0eHj2YEebQcljwL05U4kAhbSetDfxseEtsG2G+QGq7fiLKtAxL+hqT7YxmDX3exlx17D4D",
            "ssxmod_itna2": "QqGxyDRGi=itG=wK0de0P+P=x27KCePNNeCqq1dYD62U06D0vhrq03bBY=KCRD8xxvkNUxGIaxxGu=GK5CmEuIqIxCGujG4beYredVZp06hgm/lK5Aq4+wTcL5Xa1Q+kKRg/M8PgHY=e3dUCiYYiQqNL480k0OGqPRotiYdqzi3X/kGpmoKvtMAKmoLR3ALktp=O3LXpnjEPvOhPQq3EKiNenqPO70Qkr=dg86YnQKHwPzQ+Y8nGjPdmlCSXe9THqovMC+tsveYkhocoHGGWNc6RYQuLQBYZefxC0Cxq/nbu94Vafu0N1Q0rmRQAqgp62pEaIwGU4UYEjfZnPka4mxm1jYoppTQ2XBQ+AiSDPoh0cGoOneGivKbwIebEnqmeRq4jwjPy0xNjXCGtQoinP4lG2o/DExQUnDHcEoRxSDmz1YHPawZPYoEvRId+wXnLf6=R06KrEClDeEpztpoE0613uU0RtF8z96YoCiRGndDURCCLf2wcjpyRIXoQlrKZBW24c1mwqLTvYQMSmz=KU4gYcpj/6IpciR5gayRhv5l7ahmxs8vb39ZAYb9wl8K/aX6yjlpjGGmeewYUPLbf4avGw7N9czBhSjKD4FDG2n=xln9nOq4oxjPnptYLzN6ptv29fx1FrTt4NnereV=YV8fnvtp73Lu+e4QdIwVDzDYH4DFqD+gTdrIiqxaljk2GOOqV4ombzbZZopIkjeBwUgzcGDD=",
            "searchFromAjax": "{\"sid\":0,\"search_from\":1}",
            "search_list_notice": "0",
            "recent_search_data": "%25E7%25BE%258E%25E4%25BA%25BA"
        }
    def get_pic_type(self):
        return self.pic_type
    def get_pic_url(self,url = "https://699pic.com/tupian/meiren.html"):

        response = requests.get(url, headers=self.headers, cookies=self.cookies)
        # print(response.text)
        print(response.url,response)
        if response.status_code == 200:
            return response.text


if __name__ == '__main__':
    pic = SheTuWang()
    print(pic.get_pic_url())